#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>

int main()
{
    pid_t pid;

    /* child sleeps until SIGKILL signal received, then dies */
    if ((pid  = fork()) == 0)
    {
        printf("I am child, pause for SIGKILL[%d]\n", SIGKILL);
        //pause();
        sleep(5);
        printf("control should never reach here!\n");
        exit(0);
    }

    /* parents sends a SIGKILL signal to a child */
    if (kill(pid, SIGKILL) == 0)
    {
        printf("I am parent, kill child %d success!\n", pid);
    }

    return 0;
}
